<%@ page language="java" contentType="text/html;charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>"/>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>登录页面</title>
<style>
body {
	background-image:url(images/asuka&red.jpg);
	background-size: 100%;
}
table {
	font-family: 宋体;
	background-color: purple;
}
tr:hover {
	background-color: yellow;
}
</style>
</head>
<body>
	<div id="div1">
		<form method="POST" action="login/login.action" id="form1" >
			<table id="table1">
				<tr>
					<th colspan="2">请登录</th>
				</tr>
				<tr>
					<td>用户名</td>
					<td><input type="text" name="sLoginName" maxlength="15"
						placeholder="请输入用户名" onchange="loginName(this)" /></td>
				</tr>
				<tr>
					<td>密码</td>
					<td><input type="password" name="sPassword" placeholder="请输入密码" /></td>
				</tr>
				<tr>
					<td></td>
					<td>
					<input id="btn1" type="submit" value="登录"/>
					<input id="btn2" type="reset" value="重置"/>
					</td>
				</tr>
			</table>
		</form>
	</div>
</body>
<script type="text/javascript" src="js/jquery-3.2.1.js"></script>
<script type="text/javascript">
	function loginName(textObj){
		var loginName = textObj.value;
		if(loginName==null || loginName == ""){
			alert("请填写用户名");
		}
	}
	var str="<%=request.getAttribute("status")%>";
	function loginFalse(){
		if(str=="-1"){
			alert("登录失败！！！");
		}
	}
	loginFalse();
</script>
</html>